package com.rany.day02;

import java.util.Arrays;

public class DemoArrays {
    public static void main(String[] args) {
        String str = "shwudnwswmnioejfew";
        char[] chars = str.toCharArray(); //将字符串变成字符数组
        Arrays.sort(chars);//对数组进行排序
        //倒序遍历
        for (int i = chars.length - 1; i >= 0; i--) {
            System.out.print(chars[i]);
        }
    }
}
